Repository navigation
fix: 上游返回 503 时直接结束请求,不再换号重试 - #360
Closed
f30234093-lang wants to merge 1 commit into
Closed
f30234093-lang wants to merge 1 commit into
f30234093-lang wants to merge 1 commit into
Conversation
- 首轮生成收到上游 503 时直接结束请求,其余 403、404、5xx 等非额度失败的换号规则与 MAX_ACCOUNT_SWITCHES 一致 - OpenAI、Anthropic 与 Gemini 协议的上游 503 响应带 X-Should-Retry: false,上游给出重试时长时带 Retry-After - 同步设置说明、中英文 README、开发文档与协议文档 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动 / Changes
MAX_ACCOUNT_SWITCHES换号X-Should-Retry: false,OpenAI 与 Anthropic 官方 SDK 收到后结束自动重试;上游给出重试时长时带Retry-After.env.example、中英文 README、docs/development.md与docs/protocol.md验证 / Verification
TestRetryableGenerateAccountError:上游 503 结束请求,401、403、404、429、500、502、504 可以换号TestUpstreamUnavailableRetryHeaders:三种协议下上游 503、带重试时长的 503、上游 500 与账户都不可调度时的状态码与响应头go vet ./internal/api ./internal/app,go test ./internal/app ./internal/config与go test ./internal/api通过;本地以空桩代替 SpiderMonkey 与 libwebp 静态库链接,TestFitImageWebPOutputCompression由 CI 运行🤖 Generated with Claude Code